package com.leyou.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leyou.item.entity.Brand;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BrandMapper extends BaseMapper<Brand> {
    @Select("select b.id,b.name,b.image,b.letter from tb_category_brand cb INNER JOIN tb_brand b on b.id=cb.brand_id where cb.category_id=#{cid}")
    List<Brand>queryBrandByCategoryId(Long cid);
}
